// 教师综合评价
class TeacherEvaluate {
    String attendance = '' // 考勤
    String obtain = '' // 奖惩
    String expression = '' //表现
    Date createTime = new Date()
    Teacher teacher //被考评的老师
    Teacher postTeacher

    static constraints = {
        attendance(size: 1..1000)
        obtain(size: 1..1000)
        expression(size: 1..1000)
        teacher()
        postTeacher(nullable:true)
    }
    static mapping = {
       table 'xedu_teacher_evaluate'
       createTime column:'create_time' 
       postTeacher column:'post_teacher' 
    }

    String toString() {
        "${teacher.name} ${createTime.format('yyyy/MM/dd')}"
    }
}
